// // 1. 导入你的路由组件（按需引入）
// const Home = () => import('@/views/Home/index.vue')
// const About = () => import('@/views/About/index.vue')
const Login = () => import('@/views/login/index.vue')
// 这是常量路由，是每一个用户都会拥有的路由
export const constantRoute = [
    {
        path: '/login',
        name: 'Login',
        component: Login,
        meta: {
            title: '登录',//菜单标题
            hidden: true,//代表路由标题在菜单中是否隐藏  true:隐藏 false:不隐藏
            icon: "Promotion",//菜单文字左侧的图标,支持element-plus全部图标
        }
    },

    {
        path: '/',
        component: () => import('@/layout/index.vue'),
        name: 'layout',
        meta: {
            title: '',
            hidden: false,
            icon: 'HomeFilled'
        },
        redirect: '/home',
        children: [
            {
                path: '/Home',
                name: 'Home',
                component: () => import('@/views/Home/index.vue'),
                meta: {
                    title: '首页',
                    hidden: false,
                    icon: 'HomeFilled'
                },
            },
        ]
    },
    {
        path: '/screen',
        name: 'screen',
        component: () => import('../views/Screen/index.vue'),
        meta: {
            title: '数据大屏',//菜单标题
            hidden: false,//代表路由标题在菜单中是否隐藏  true:隐藏 false:不隐藏
            icon: "DataLine",//菜单文字左侧的图标,支持element-plus全部图标
        }
    },
    {
        path: '/404',
        name: '404',
        component: () => import('@/views/404/index.vue'),
        meta: {
            title: '404',
            hidden: true,
            icon: 'DocumentDelete'
        }
    },


]

// 这是异步路由，需要动态的去添加
export const asyncRoute = [
    {
        path: '/acl',
        component: () => import('@/layout/index.vue'),
        name: 'Acl',
        meta: {
            title: '权限管理',
            hidden: false,
            icon: 'Lock'
        },
        redirect: '/acl/user',
        children: [
            {
                path: '/acl/user',
                name: 'User',
                component: () => import('@/views/Acl/user/index.vue'),
                meta: {
                    title: '用户管理',
                    hidden: false,
                    icon: 'User'
                },
            },
            {
                path: '/acl/role',
                name: 'Role',
                component: () => import('@/views/Acl/role/index.vue'),
                meta: {
                    title: '角色管理',
                    hidden: false,
                    icon: 'UserFilled'
                },
            },
            {
                path: '/acl/permission',
                name: 'Permission',
                component: () => import('@/views/Acl/permission/index.vue'),
                meta: {
                    title: '菜单管理',
                    hidden: false,
                    icon: 'Monitor'
                },
            },
        ]
    },
    {
        path: '/product',
        component: () => import('@/layout/index.vue'),
        name: 'Product',
        meta: {
            title: '商品管理',
            hidden: false,
            icon: 'Goods'
        },
        redirect: '/product/trademark',
        children: [
            {
                path: '/product/trademark',
                name: 'Trademark',
                component: () => import('@/views/Product/trademark/index.vue'),
                meta: {
                    title: '品牌管理',
                    hidden: false,
                    icon: 'ShoppingCartFull'
                },
            },
            {
                path: '/product/attr',
                name: 'Attr',
                component: () => import('@/views/Product/attr/index.vue'),
                meta: {
                    title: '属性管理',
                    hidden: false,
                    icon: 'ChromeFilled'
                },
            },
            {
                path: '/product/spu',
                name: 'Spu',
                component: () => import('@/views/Product/Spu/index.vue'),
                meta: {
                    title: 'SPU管理',
                    hidden: false,
                    icon: 'Calendar'
                },
            },
            {
                path: '/product/sku',
                name: 'Sku',
                component: () => import('@/views/Product/Sku/index.vue'),
                meta: {
                    title: 'SKU管理',
                    hidden: false,
                    icon: 'Orange'
                },
            },
        ]
    },
]

//任意路由
export const anyRoute = {
    path: '/:pathMatch(.*)*',
    name: 'Any',
    redirect: '/404',
    meta: {
        title: '任意路由',
        hidden: true,
        icon: 'DataLine'
    }

}